<!DOCTYPE html>
<html>
<head>
    <template file="Home/meta" />
    <template file="Home/css" />









</head>
<body>
<template file="Home/search" />


<div class="weui_panel_hd am-margin-top-sm">

    <h2>我的收藏</h2>
</div>




<div class=" am-padding-vertical-sm      index_cate_product">




    <volist name="_list" id="v">

        <div class=" am-cf cart-list-item   am-margin-vertical-sm am-padding-vertical-sm  common-border-top  " style="background: #fafafa">


            <div class="am-u-sm-4"><img src="{$v.thumb}" class="am-img-responsive" alt=""></div>
            <div class="am-u-sm-5 am-text-xs">




                <a href="{:U('Home/Product/show',array('id'=>$v['id']))} " class="">
                    <h3 class="am-margin-0">
                        {$v.title}</h3>
                    <div class="sku am-text-999" >

                        颜色分类:{$v.color};尺码: {:F('Var_chicun')[$v["chicun"]][name]}:外框: {:F('Var_waikuang')[$v["waikuang"]][name]}</div>
                </a>







            </div>


            <div class="am-u-sm-3 am-text-right">






                <div class="pay am-margin-top-sm am-cf div_info " >


                    <div class="">

                        <span class="am-text-danger am-text-sm"> ￥ <span id="price-{$key}">{$v.price}</span></span>




                    </div>



                </div>



            </div>





        </div>
        <div class=" common-border-top common-border-bottom am-text-right am-padding-vertical-sm am-g" >

            <a href='{:U("User/Favorite/delete",array("id"=>$v["l_id"]))}' class='ajax-get  am-padding-horizontal-lg btn-hui ' >取消关注</a>
            <a href="{:U('Home/Product/show',array('id'=>$v['id']))}" class=' am-padding-horizontal-lg btn-write'>立即购买</a>

        </div>
    </volist>


</div>





<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-index  common-border-top"
     id="">
    <template file="Home/bottom_nav" />
</div>
<template file="Home/js" />





<script>


    num = 1;

    function add_news(obj) {

        $.post("{:get_now_url()}", { page: num }, function (data) {
            var html = $("#product_list").html();

            if (data!=null) {


                $.each(data, function (news, v) {




                    html += " <li class='am-padding-xs'>";

                    html += "                <div  class='am-img-thumbnail am-padding-xs am-padding-vertical-sm am-block' >";

                    html += "                    <div class='img'>";
                    html += "                        <a href='/Home/Product/show/id/"+ v.id+"'>";
                    html += "                            <img class='am-img-responsive' src='"+ v.thumb+"' alt=''>";
                    html += "                        </a>";

                    html += "                    </div>";
                    html += "                    <a href='' class='title am-block am-text-center am-text-truncate'>"+ v.title+"</a>";
                    html += "                    <span class='price'>"+v.price+"</span>";
                    html += "                    <a href='/User/Favorite/delete/id/"+ v.l_id+"' class='ajax-get price'>移除</a>";

                    html += "                </div>";
                    html += "            </li>";




                });

                $("#product_list").html(html);

                num++;
            }
            else {

                $(obj).attr("disabled", "disabled");
                $(obj).html("没有了");
            }

        });


    }
    $(function () {
        add_news();

    })





</script>



</body>
</html>